﻿using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using MyCompanyName.AbpZeroTemplate.Authorization.Roles.Dto;
using System.Collections.Generic;
using System.Web.Http;
using MyCompanyName.AbpZeroTemplate.Authorization.Users.Dto;

namespace MyCompanyName.AbpZeroTemplate.Authorization.Roles
{
    /// <summary>
    /// Application service that is used by 'role management' page.
    /// </summary>
    public interface IRoleAppService : IApplicationService
    {
        Task<ListResultOutput<RoleListDto>> GetRoles();

        Task<List<RoleListDto>> GetAll();

        Task<GetRoleForEditOutput> GetRoleForEdit(NullableIdInput input);

        Task<List<GetPermissionCheckTree>> GetRolePermission([FromUri]int roleId);

        Task SetRolePermissions(UpdateRolePermissionsInput input);
        List<GetUserOutPut> GetUsers([FromUri]int roleId);

        Task CreateOrUpdateRole(CreateOrUpdateRoleInput input);

        Task EditRole(List<KeyValuePair<int, string>> input);
        Task CreateRole(CreateRoleInPut input);

        Task DeleteRole(EntityRequestInput input);
        List<GetProjectPermissionOutPut> GetProjectPermission([FromUri] int roleId);
        Task<List<dynamic>> GetDocumentPermission([FromUri] int roleId);
        Task SetProjectPermission(SetProjectPermissionInPut input);
        Task SetDocumentPermission(SetDocumentPermissionInPut input);
    }
}